<?php
class Widget extends AppModel {

	var $name = 'Widget';
	var $validate = array(
		'order' => array('numeric')
	);

	function loadWidgets() {
		$widgets = $this->find('all', array(
			'conditions' => array(
				'Widget.active' => 'y'
			),
			'order' => 'Widget.order asc'
		));
		
		return $widgets;
	}
}
?>